package cn.itcast.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.domain.HeiMaClass;

 

public interface ClassRepository extends JpaRepository<HeiMaClass,Integer>{
   @Query(value="update  HeiMaClass    set name  =?  where id = ?")
   @Modifying
	public void update(Integer id, String name);
 
   
   public List<HeiMaClass> findByClassStatus(String status);

//删除班级 将classStatus 修改为 0
   @Query(value="update HeiMaClass set classStatus = 0 where id =?")
public void updateStatus(String classStatus);
    
}
